import {createBrowserRouter} from "react-router-dom";


import Layout from '../Layout/index.jsx'


import HomePage from '../pages/Home/index.jsx'
import LoginPage from '../pages/login'
import ListPage from '../pages/list'
import News from '../pages/news'
import Time from '../pages/news/time.jsx'
// 创建路由系统
const router = createBrowserRouter([
    {
        path: '/',
        element: <Layout></Layout>,
        children: [
            {path: '/', element: <HomePage/>},
            {path: '/list', element: <ListPage/>},
            {
                path: '/news', element: <News/>, children: [
                    {path:'/news/time',element:<Time></Time>}
                ]
            },
        ]
    },

    {path: '/login', element: <LoginPage/>},
])


export default router